﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace YJKArch.RoomRoofModule
{
	internal partial class DlgDimFloor : System.Windows.Forms.Form
	{
		public DimFloorData DimFloorData { get; set; }

		public static DlgDimFloor GetInstance()
		{
			if (DlgDimFloor.ddf == null || DlgDimFloor.ddf.IsDisposed)
			{
				DlgDimFloor.ddf = new DlgDimFloor();
			}
			return DlgDimFloor.ddf;
		}

		public DlgDimFloor()
		{
			this.InitializeComponent();
			this.DimFloorData = new DimFloorData();
		}

		private void DlgDimFloor_Load(object sender, EventArgs e)
		{
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			if (this.cbxArch.Checked)
			{
				this.DimFloorData.DimType = DimType.ArchStruct;
			}
			else
			{
				this.DimFloorData.DimType = DimType.Struct;
			}
			if (this.rbSingle.Checked)
			{
				this.DimFloorData.SelectType = SelectType.Single;
				return;
			}
			if (this.rbMulti.Checked)
			{
				this.DimFloorData.SelectType = SelectType.Multi;
				return;
			}
			this.DimFloorData.SelectType = SelectType.All;
		}

		private static DlgDimFloor ddf;
	}
}
